// FormMainChildDlg12Sub03_10.cpp : implementation file
//

#include "stdafx.h"
#include "diabetes.h"
#include "FormMainChildDlg12Sub03_10.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFormMainChildDlg12Sub03_10 dialog


CFormMainChildDlg12Sub03_10::CFormMainChildDlg12Sub03_10(CString sz_title,CWnd* pParent /*=NULL*/)
	: CDialog(CFormMainChildDlg12Sub03_10::IDD, pParent)
{
	//{{AFX_DATA_INIT(CFormMainChildDlg12Sub03_10)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	this->m_sz_title = sz_title;
}


void CFormMainChildDlg12Sub03_10::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFormMainChildDlg12Sub03_10)
	DDX_Control(pDX, IDC_TAB_WEB, m_sub_frame_tab);
	DDX_Control(pDX, IDC_STATIC_TITLE, m_title);
	DDX_Control(pDX, IDC_STATIC_13, m_13);
	DDX_Control(pDX, IDC_STATIC_12, m_12);
	DDX_Control(pDX, IDC_STATIC_11, m_11);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFormMainChildDlg12Sub03_10, CDialog)
	//{{AFX_MSG_MAP(CFormMainChildDlg12Sub03_10)
	ON_BN_CLICKED(IDC_STATIC_11, OnStatic11)
	ON_BN_CLICKED(IDC_STATIC_12, OnStatic12)
	ON_BN_CLICKED(IDC_STATIC_13, OnStatic13)
	ON_WM_LBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFormMainChildDlg12Sub03_10 message handlers

void CFormMainChildDlg12Sub03_10::OnStatic11() 
{
	ImageButton_AllNormal();
	m_11.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(0);
}

void CFormMainChildDlg12Sub03_10::OnStatic12() 
{
	ImageButton_AllNormal();
	m_12.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(1);
}

void CFormMainChildDlg12Sub03_10::OnStatic13() 
{
	ImageButton_AllNormal();
	m_13.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(2);
}

BOOL CFormMainChildDlg12Sub03_10::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	//
	ImageButton_Initial();
	//
	::SetShapeWindowSkin(this->m_hWnd, "IDD_FORM_MAIN_CHILD_DLG12_SUB03_01");
	this->m_title.SetWindowText(this->m_sz_title);
	m_sub_frame_tab.AddPage("m_dlg1001",&m_dlg1001,IDD_FORM_MAIN_CHILD_DLG12_SUB03_10_01);
	m_sub_frame_tab.AddPage("m_dlg1002",&m_dlg1002,IDD_FORM_MAIN_CHILD_DLG12_SUB03_10_02);
	m_sub_frame_tab.AddPage("m_dlg1003",&m_dlg1003,IDD_FORM_MAIN_CHILD_DLG12_SUB03_10_03);
	m_sub_frame_tab.Show();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CFormMainChildDlg12Sub03_10::ImageButton_Initial()
{
	m_11.Initial(TRUE,IDB_BITMAP_10_10,IDB_BITMAP_10_11);
	m_12.Initial(FALSE,IDB_BITMAP_10_20,IDB_BITMAP_10_21);
	m_13.Initial(FALSE,IDB_BITMAP_10_30,IDB_BITMAP_10_31);
}

void CFormMainChildDlg12Sub03_10::ImageButton_AllNormal()
{
	m_11.SetPressed(FALSE);
	m_12.SetPressed(FALSE);
	m_13.SetPressed(FALSE);
}

void CFormMainChildDlg12Sub03_10::OnLButtonDown(UINT nFlags, CPoint point) 
{
	CDialog::OnLButtonDown(nFlags, point);
	PostMessage( WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM( point.x, point.y));
}